<?
include "../config/constants.php";

try{
	$wsclient = new SoapClient(WS_PORTAL, array('trace' => 1));
	$res = $wsclient->getCIDByStatus(array('_status'=>STATUS_CONTENTS_UPLOADED))->return->PortalIntraWebService_struct_cidstatus;

	if( gettype( $res ) == "object" ) $res = array($res);

	if( $res ) foreach( $res as $i )
	{
		//$wsclient->updateContentStatus( array( '_cid'=>$i->cid, '_status'=>STATUS_CONTENTS_MMINIT ) );
/*		$reqc = new HttpRequest(SRV_CONTENT_STATUS_UPDATE, HttpRequest::METH_POST);
		$reqc->addPostFields(array('_cid'=>$i->cid));
		$reqc->addPostFields(array('_status'=>STATUS_CONTENTS_MMINIT));
		$reqc->send();
*/		$_cid=$i->cid;
		$_status=STATUS_CONTENTS_MMINIT;
		include "../ServiceManager/UpdateContentStatus.php";

	}
}catch(exception $e){

	echo "FATAL ERROR<br/>$e";
	echo $wsclient->__getLastRequest();
	exit;	
}

?>
